<?php
namespace Wap\Controller;
use Wap\Controller\CommonController;
class IntroduceController extends CommonController {

    /**
      +----------------------------------------------------------
     * 首页
     *
      +----------------------------------------------------------
     */
    public function index() {
 		$q=M('pages');
 		$info1=$q->select();
 		$this->assign('info2',$info1);


 		$id = I('get.id');

        if ($id) {
        	# code...
        	$inf = $q->where(array('id'=>$id))->find();
          $inf['intro']=html_entity_decode($inf['intro']);
            $this->assign('inf',$inf);	
        }else{
        	$inf = $q->where('id=1')->find();
          $inf['intro']=html_entity_decode($inf['intro']);
        	$this->assign('inf',$inf);

        }




		$this->display(); // 输出模板
    }



    

}
 
?>